/******************************************************************************
 * @File name   :      IResetPasswordService.java
 *
 * @Author      :      chen shixiang
 *
 * @Date        :      2011-6-22
 *
 * @Copyright Notice: 
 * Copyright (c) 2014 DMS, Inc. All  Rights Reserved.
 * This software is published under the terms of the DMS Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * 
 * ----------------------------------------------------------------------------
 * Date                   Who         Version        Comments
 * 2011-6-22 上午09:52:11        chen shixiang     1.0            Initial Version
 * 2011-9-16 下午01:42:11        He Hao     1.1            Add Method validationUser
 * 2011-9-16 下午05:42:11        He Hao     1.2           Change Method validationUser
 *****************************************************************************/
package com.cap.bts.framework.ge.resetpassword.service;

import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.service.IBaseService;
import com.cap.bts.framework.ge.resetpassword.dto.CertificateDto;
import com.cap.bts.framework.ge.resetpassword.dto.ResetPasswordDto;
import com.cap.bts.framework.ge.resetpassword.dto.UserInfoDto;
import com.cap.bts.framework.usermgnt.domain.User;
import com.cap.bts.framework.workbench.userlogin.dto.OperationPwdDto;

/**
 *
 */
public interface IResetPasswordService extends IBaseService {

    /**
     * get user certificate
     * @Date        :      2011-6-22
     * @param userCode user code
     * @return CertificateDto
     * @throws AppException AppException
     */
    public CertificateDto getUserCertificateType(String userCode)throws AppException;
    /**
     * validation user
     * @Date        :      2011-6-22
     * @param resetPasswordDto resetPasswordDto
     * @return boolean
     * @throws AppException AppException
     */
    public boolean verifyResetPasswordRequest(ResetPasswordDto resetPasswordDto)throws AppException;
    
    
    
    public UserInfoDto verifyResetPasswordRequest(UserInfoDto userInfoDto)throws AppException;
    
    /**
     * validation user
     * @Date        :      2011-6-22
     * @param resetPasswordDto resetPasswordDto
     * @return boolean
     * @throws AppException AppException
     */
    public boolean validationUser(ResetPasswordDto resetPasswordDto)throws AppException;
    /**
     * get new password
     * @Date        :      2011-6-22
     * @return password
     * @throws AppException AppException
     */
    public String generateNewPassword()throws AppException;
    /**
     * get user phone
     * @Date        :      2011-6-22
     * @param userCode user code
     * @return mobilephone
     * @throws AppException AppException
     */
    public Long getUserMobilePhone(String userCode)throws AppException;
    
    
    
    
    public String getUserMobilePhoneFromDealer(String userCode)throws AppException;
    
    
    
    /**
     * send new pass 
     * @Date        :      2011-6-22
     * @param userCode
     * @param newPassword
     * @throws AppException AppException
     */
    public void sendNewPassword(String userCode,String newPassword)throws AppException;
    /**
     * update password
     * @Date        :      2011-6-22
     * @param userCode
     * @param password
     * @param operatorId
     * @return boolean
     * @throws AppException AppException
     */
    public boolean updatePassword(String userCode,String password,long operatorId)throws AppException;
    /**
     * send message
     * @Date        :      2012-2-24
     * @param user
     * @param newPwd
     * @param mobilePhone
     * @throws AppException
     */
    public void sendMessage(User user, String newPwd, Long mobilePhone) throws AppException;
    
    /**
     * @Date        :      2015年7月27日
     * @param userInfoDto
     * @return
     * @throws AppException
     */
    public OperationPwdDto verifyResetOperationPwdRequest(OperationPwdDto operationPwdDto)throws AppException;
    
    public boolean updateOperationPassword(String dealerNum,String newPwd) throws AppException;
}
